<?php

class LopHoc extends CI_Controller
{
	function xemlophoc()
	{
		$data = array(
			'page'=>'lophoc'
		);
		$this->load->view('templateuser', $data);
	}
	
	function dangkylophoc($makl)
	{
		$ttkl = $this->mkhoalan->thongtinkhoalan($makl);
		$data = array(
			'id'=>$ttkl->makl,
			'name'=>$ttkl->tenkl,
			'qty'=>1,
			'price'=>$ttkl->gia
		);
		$this->cart->insert($data);
		redirect('shoppingcart/xemlophoc');
	}
	
	function xoalophoc($rowid)
	{
		$data = array(
			'rowid'=>$rowid,
			'qty'=>0
		);
		$this->cart->update($data);
		redirect('shoppingcart/xemlophoc');
	}
	
}

?>